package org.kia.data.interfaces;

import org.kia.data.adapters.RequestAdapter;


/**
 * Interface for asynchronous data requests callbacks
 *
 * @author Amir Lazarovich
 */
public interface OnDataReceivedListener<ResponseType> {
	
	/**
	 * Invoked when data is received
	 * 
	 * @param data
	 * @return 
	 */
	public void onDataReceived(ResponseType data);

    /**
     * Invoked when data failed to receive from the server
     *
     * @param request
     * @param errorCode
     * @param errorMessage
     */
    public void onDataFailure(RequestAdapter request, long errorCode, String errorMessage);
}
